import request from '@/utils/request'

// 查询app首页导航列表
export function listNavigate(query) {
  return request({
    url: '/app/navigate/list',
    method: 'get',
    params: query
  })
}

// 查询app首页导航详细
export function getNavigate(navigateId) {
  return request({
    url: '/app/navigate/' + navigateId,
    method: 'get'
  })
}

// 新增app首页导航
export function addNavigate(data) {
  return request({
    url: '/app/navigate',
    method: 'post',
    data: data
  })
}

// 修改app首页导航
export function updateNavigate(data) {
  return request({
    url: '/app/navigate',
    method: 'put',
    data: data
  })
}

// 删除app首页导航
export function delNavigate(navigateId) {
  return request({
    url: '/app/navigate/' + navigateId,
    method: 'delete'
  })
}

// 导出app首页导航
export function exportNavigate(query) {
  return request({
    url: '/app/navigate/export',
    method: 'get',
    params: query
  })
}

// 改变状态
export function changeNavigateStatus(navigateId, navigateStatus) {
  const data = {
    navigateId,
    navigateStatus
  }
  return request({
    url: '/app/navigate/changeNavigateStatus',
    method: 'put',
    data: data
  })
}

// 查询app首页导航列表
export function queryGoodsListNavigate(query) {
  return request({
    url: '/app/navigate/selectAppNavigateByCodes',
    method: 'get',
    params: query
  })
}
